import request from '@/router/axios'

export function fetchList(id) {
  return request({
    url: '/stm/swstinputpassengerworkelectron/getListById/'+id,
    method: 'get'
  })
}

export function addObj(obj) {
  obj.bomCode = obj.bomCode.join(",");
  return request({
    url: '/stm/swstinputpassengerworkelectron',
    method: 'post',
    data: obj
  })
}

export function putObj(obj) {
  obj.bomCode = obj.bomCode.join(",");
  return request({
    url: '/stm/swstinputpassengerworkelectron',
    method: 'put',
    data: obj
  })
}

//查看电子事务历史记录
export function queryPastRecords(param){
  return request({
    url: '/stm/swstinputpassengerworkelectron/getLogById/'+param.id,
    method: 'get'
  })
}

